﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace UI.Application.Main.Views
{
    /// <summary>
    /// MainView.xaml 的交互逻辑
    /// </summary>
    public partial class MainView : UserControl
    {

        public MainView()
        {
            InitializeComponent();
        }

        private void _MenuGrid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if(e.OriginalSource is Grid && e.ClickCount==1 && e.ButtonState== MouseButtonState.Pressed)
            {
                System.Windows.Application.Current?.MainWindow.DragMove();
            }
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Application.Current.MainWindow.Close();
        }
    }
}
